/*
 * @Descripttion: 
 * @version: 
 * @Author: yuanpingfang
 * @Date: 2021-03-31 20:35:46
 * @LastEditors: yuanpingfang
 * @LastEditTime: 2021-04-23 10:17:34
 */
import request from '@/utils/request'

// 查询文档列表
export function listContent(query) {
  return request({
    url: '/doc/content/list',
    method: 'get',
    params: query
  })
}

// 查询文档详细
export function getContent(contentId) {
  return request({
    url: '/doc/content/' + contentId,
    method: 'get'
  })
}

// 新增文档
export function addContent(data) {
  return request({
    url: '/doc/content',
    method: 'post',
    data: data
  })
}

// 修改文档
export function updateContent(data) {
  return request({
    url: '/doc/content',
    method: 'put',
    data: data
  })
}

// 删除文档
export function delContent(contentId) {
  return request({
    url: '/doc/content/' + contentId,
    method: 'delete'
  })
}

// 导出文档
export function exportContent(query) {
  return request({
    url: '/doc/content/export',
    method: 'get',
    params: query
  })
}

// 提交文档审批
export function startWorkflowContent(contentId) {
  return request({
    url: '/doc/content/startWorkflow/' + contentId,
    method: 'get'
  })
}


// 删除文档
export function moveContent(targetContentId, contentIds) {
  return request({
    url: '/doc/content/move/' + targetContentId + '/' + contentIds,
    method: 'get'
  })
}